package com.spdb.oa.util;

import com.spdb.oa.type.Version;

public class OAServiceUtil {
	public static String buildParameter(Version version, String processId, String instanceId,
			String distributionId, String feedbackParameter) {
		String parameterTemplate = "<?xml version=\"%s\" encoding=\"utf-8\"?><Parameter version=\"1.0\"><ProcessID><![CDATA[%s]]></ProcessID>"
				+ "<InstanceID><![CDATA[%s]]></InstanceID><DistributionID><![CDATA[%s]]></DistributionID>"
				+ "<FeedbackParameter><![CDATA[%s]]></FeedbackParameter></Parameter>";
		
		
		String parameter = String.format(parameterTemplate, version.toString(), processId,
				instanceId, "0", feedbackParameter);
		
		return parameter;
	}
}
